<?php

namespace App\Admin\Tool;

use App\Models\Prizelist;
use App\Models\Scorelist;

class Express
{
    /**
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
     */
    public static function express($id)
    {
        $list = Scorelist::find($id);
        $shipper = $list->ecompany;
        $logistic =$list->express_id;
        $json=getOrderTracesByJson($shipper,$logistic);
        $expresses = json_decode($json, true);
        return view('admin::dashboard.express',['expresses'=>$expresses]);
    }
    /**
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
     */
    public static function prizeExpress($id)
    {
        $list = Prizelist::find($id);
        $shipper = $list->ecompany;
        $logistic =$list->express_id;
        $json=getOrderTracesByJson($shipper,$logistic);
        $expresses = json_decode($json, true);
        return view('admin::dashboard.express',['expresses'=>$expresses]);
    }
}
